<template>
	<view class="web">
		<web-view class="web-view" :src="url" @message="getMessage"></web-view>
	</view>
</template>

<script>
	import { Base64 } from "@/common/base64.js"
	export default {
		data() {
			return {
				url: '',
				title: ''
			}
		},
		onLoad(option) {
			this.url = Base64.decode(option.url)
		},
		methods: {
			getMessage(event) {
				console.log(event.detail.data);
			}
		}
	}
</script>

<style lang="less">
	page {
		display: flex;
		width: 100%;
		min-height: 100%;
		background-color: #f5f5f5;
	}
	.web {
		flex: 1;
		width: 100%;
		min-height: 100%;
		display: flex;
		flex-direction: column;
		.web-view {
			flex: 1;
		}
	}
</style>
